12. Use the For Loop
Use the For Loop
Question:
Start Quiz:
Solution:
Hint
Here is an example of a for loop:
for (int index = 0; index < 3; index++) {
Log.v("NumbersActivity", "Index:" + index + " Value:" + words.get(index));
}
that will display the following output in the logs:
Index:0 Value:one
Index:1 Value:two
Index:2 Value:three